package com.itheima.mapper;

import com.itheima.domain.Student;
import com.itheima.domain.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @param
 * @return
 */
public interface StudentMapper {
    @Select("select * from student")
    List<Student> findAll() throws Exception;
@Insert("insert into student values(#{number},#{name},#{birthday},#{address})")
    void add(Student student);
@Update("update student set name=#{name},birthday=#{birthday},address=#{address} where number=#{number}")
    void update(Student student);
@Delete("delete from student where number=#{number}")
    void delete(String number);
}
